﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models.Mailbox
{
    public class MailboxConfigure
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
        public int Id { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [SugarColumn(ColumnName = "FROM_EMAIL")]
        public string FromEmail { get; set; } = string.Empty;

        /// <summary>
        /// SMTP端口
        /// </summary>
        [SugarColumn(ColumnName = "SMTP_PORT")]
        public int SmtpPort { get; set; }

        /// <summary>
        /// SMTP服务器地址
        /// </summary>
        [SugarColumn(ColumnName = "SMTP_SERVE")]
        public string SmtpServe { get; set; } = string.Empty;

        /// <summary>
        /// 授权码
        /// </summary>
        [SugarColumn(ColumnName = "EXCEL_PASSWORD")]
        public string ExcelPassWord { get; set; } = string.Empty;


        /// <summary>
        /// 用户登录账号
        /// </summary>
        [SugarColumn(ColumnName = "USER_NAME")]
        public string UserName { get; set; } = string.Empty;

        public MailboxConfigure(int id, string fromEmail, int smtpPort, string smtpServe, string excelPassWord, string userName)
        {
            Id = id;
            FromEmail = fromEmail;
            SmtpPort = smtpPort;
            SmtpServe = smtpServe;
            ExcelPassWord = excelPassWord;
            UserName = userName;
        }

        public MailboxConfigure()
        {
        }
    }
}
